<?php

namespace app\company\model;

use app\common\model\BaseModel;
use app\common\model\CompanyWarehouse;
use think\model\relation\BelongsTo;
use think\model\relation\HasMany;

class CompanyWarehouseArea extends BaseModel
{
    public function location(): HasMany
    {
        return $this->hasMany(CompanyWarehouseLocation::class,'area_id');
    }

    public function warehouse(): BelongsTo
    {
        return $this->belongsTo(CompanyWarehouse::class,'warehouse_id');
    }
}